#include #include #include #include #include #include "sceneLoader.h" #include "util.h" // randomFloat -- // // // // return a random floating point value between 0 and 1 static float randomFloat() { return static_cast(rand()) / RAND_MAX; } static void makeCircleGrid( int startIndex, int circleCount, float circleRadius, float circleColor[3], float startOffsetX, float startOffsetY, float* position, float* color, float* radius) { int index = startIndex; for (int j=0; j depths(numCircles); for (int i=0; i()); for (int i=0; i depths(numCircles); for (int i=0; i()); for (int i=0; i depths(numCircles); for (int i=0; i(i) / numCircles), .1f) + (-.05f + .1f * randomFloat()), 0.f, 1.f); } // sort the depths, and then assign depths to particles std::sort(depths.begin(), depths.end(), std::greater()); const static float kMinSnowRadius = .0075f; for (int i=0; i